package licode.unisop.auth.infrastructure.init;

import licode.unisop.oidc.auth.api.AuthChecker;
import licode.unisop.oidc.auth.stu.CheckUtil;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AuthInit implements ApplicationRunner {
    @Resource
    private AuthChecker authChecker;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        CheckUtil.setAuthChecker(authChecker);
    }
}
